package com.zte.claa.inficombo.csa.app.service.dev;

import java.util.List;

import com.zte.claa.inficombo.csa.app.model.dev.DevBase;
import com.zte.claa.inficombo.csa.app.model.dev.DevPagePara;
import com.zte.claa.inficombo.csa.app.model.dev.SensorDevEuiPV;
import com.zte.claa.inficombo.csa.app.model.redis.ProjectDev;

public interface DevBaseService {
	/**
	 * 分页查询dev列表
	 * 
	 * @param pp
	 * @return
	 * @throws Exception
	 */
	public List<DevBase> queryDevs(DevPagePara pp) throws Exception;
	
	/**
	 * 分页查询dev列表
	 * 
	 * @param pp, @param appeui
	 * @return
	 * @throws Exception
	 */
	public List<DevBase> queryDevsByAppeui(DevPagePara pp, String appeui) throws Exception;
	
	/**
	 * 查询指定deveui对应的dev
	 * 
	 * @param deveui
	 * @return
	 * @throws Exception
	 */
	public DevBase queryDevByEui(String deveui) throws Exception;
	
	/**
	 * 查询指定deveui对应的dev完整信息
	 * 
	 * @param deveui
	 * @return
	 * @throws Exception
	 */
	public ProjectDev queryProjectDevByEui(String deveui) throws Exception;
	
	/**
	 * 分页查询dev总数. 
	 * 
	 * @return
	 * @throws Exception
	 */
	public int queryAllDevTotalNum() throws Exception;
	
	/**
	 * 分页查询SensorDevEuiPV列表
	 * 
	 * @param pp
	 * @return
	 * @throws Exception
	 */
	public List<SensorDevEuiPV> querySensorDevEuiPVs(DevPagePara pp) throws Exception;
	
	/**
	 * 查询指定sensorid对应的SensorDevEuiPV
	 * 
	 * @param deveui
	 * @return
	 * @throws Exception
	 */
	public SensorDevEuiPV querySensorDevEuiPV(String sensorid) throws Exception;	
	
	/**
	 * 插入SensorDevEuiPV
	 * 
	 * @param pp
	 * @return
	 * @throws Exception
	 */
	public void addSensorDevEuiPV(SensorDevEuiPV pv) throws Exception;
	
	/**
	 * 删除SensorDevEuiPV
	 * 
	 * @param pp
	 * @return
	 * @throws Exception
	 */
	public int remvoeSensorDevEuiPV(String sensorid) throws Exception;
	
	/**
	 * 删除DTU关联的全部SensorDevEuiPV
	 * 
	 * @param pp
	 * @return
	 * @throws Exception
	 */
	public int remvoeSensorDevEuiPVByDev(String deveui) throws Exception;
	
	/**
	 * 修改设备坐标
	 * 
	 * @param deveui
	 * @param devaddr
	 * @return
	 * @throws Exception
	 */
	public int updateDevCoordinate(String deveui, double gpslat, double gpslng, int gpsalt) throws Exception;
	
	/**
	 * 修改设备位置
	 * 
	 * @param deveui
	 * @param devaddr
	 * @return
	 * @throws Exception
	 */
	public int updateDevAddress(String deveui, String devaddr) throws Exception;
}
